Update Monads: Cointerpreting Directed Containers

نویسندگان

  • Danel Ahman
  • Tarmo Uustalu
چکیده

Containers are a neat representation of a wide class of set functors. We have previously [1] introduced directed containers as a concise representation of comonad structures on such functors. Here we examine interpreting the opposite categories of containers and directed containers. We arrive at a new view of a di↵erent (considerably narrower) class of set functors and monads on them, which we call update monads.1 A container is given by a set S (of shapes) and an S-indexed family of sets P (of positions). Containers form a category Cont with a (composition) monoidal structure. Containers interpet into set functors by JS, P K X = ⌃s : S. P s! X The functor J K : Cont! [Set,Set] is monoidal and fully faithful. A directed container is a container (S, P ) together with operations

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

19th International Conference on Types for Proofs and Programs

We introduce update monads as a generalization of state monads. Update monads are thecompatible compositions of reader and writer monads given by a set and a monoid. Distributivelaws between such monads are given by actions of the monoid on the set.We also discuss a dependently typed generalization of update monads. Unlike simple updatemonads, they cannot be factored into a ...

متن کامل

Partiality and Container Monads

We investigate monads of partiality in Martin-Löf type theory, following Moggi’s general monad-based method for modelling effectful computations. These monads are often called lifting monads and appear in category theory with different but related definitions. In this paper, we unveil the relationship between containers and lifting monads. We show that the lifting monads usually employed in typ...

متن کامل

Monads Need Not Be Endofunctors

We introduce a generalisation of monads, called relative monads, allowing for underlying functors between different categories. Examples include finite-dimensional vector spaces, untyped and typed λ-calculus syntax and indexed containers. We show that the Kleisli and Eilenberg-Moore constructions carry over to relative monads and are related to relative adjunctions. Under reasonable assumptions...

متن کامل

Monads for Functional Programming

The use of monads to structure functional programs is de scribed Monads provide a convenient framework for simulating e ects found in other languages such as global state exception handling out put or non determinism Three case studies are looked at in detail how monads ease the modi cation of a simple evaluator how monads act as the basis of a datatype of arrays subject to in place update and ...

متن کامل

Dijkstra and Hoare monads in monadic computation

The Dijkstra and Hoare monads have been introduced recently for capturing weakest precondition computations and computations with preand post-conditions, within the context of program verification, supported by a theorem prover. Here we give a more general description of such monads in a categorical setting. We first elaborate the recently developed view on program semantics in terms of a trian...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2013